package jonggyuni.basic;

public class J15_Printer {

	public static void main(String[] args) {
		Printer p01 = new Printer();
		p01.Print();
		
		InkjetPrinter p02 = new InkjetPrinter();
		p02.Print();
		
		LaserPrinter p03 = new LaserPrinter();
		p03.Print();
	}//main

}//class


//부모클래스
class Printer{
	public String model;
	public String maker;
	public String type;
	public int papers;
	public int remain;
	
	public void Print(){
		System.out.println("프린터입니다.");
	}

}

//자식클래스

class InkjetPrinter extends Printer{
	public int inkRemains;
	
	@Override
	public void Print() {
		System.out.println("잉크젯 프린터입니다.");
	}
	
}

class LaserPrinter extends Printer{
	public int tonerRemains;
	
	@Override
	public void Print() {
		System.out.println("레이져 프린트입니다.");
	}
	
}








